

<!DOCTYPE html>
<html lang="zh-CN" data-default-color-scheme=auto>



<head>
  <meta charset="UTF-8">
  <link rel="apple-touch-icon" sizes="76x76" href="/img/favicon.png">
  <link rel="icon" href="/img/favicon.png">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  
  <meta name="theme-color" content="#2f4154">
  <meta name="author" content="老王">
  <meta name="keywords" content="">
  
    <meta name="description" content="全基因组关联分析从正向遗传学的角度出发，探究“基因型-表型”之间的关联，近年来在人类疾病和作物产量、品质以及抗逆等多方面的遗传机理研究中发挥重要作用。然而由于连锁不平衡（Linkage Disequilibrium，LD）的存在，我们很难直接从 GWAS 结果中找到和表型相关的因果变异（causal variant）或候选基因。尤其在自交作物中，由于 LD 衰减较慢，这一问题更加突出。全转录组关联">
<meta property="og:type" content="article">
<meta property="og:title" content="什么？EMMAX也能做全转录组关联分析（Transcriptome-wide Association Study，TWAS）">
<meta property="og:url" content="https://laowang2023.cn/2025/11/14/20251114-emmaxtwas/index.html">
<meta property="og:site_name" content="请叫我老王">
<meta property="og:description" content="全基因组关联分析从正向遗传学的角度出发，探究“基因型-表型”之间的关联，近年来在人类疾病和作物产量、品质以及抗逆等多方面的遗传机理研究中发挥重要作用。然而由于连锁不平衡（Linkage Disequilibrium，LD）的存在，我们很难直接从 GWAS 结果中找到和表型相关的因果变异（causal variant）或候选基因。尤其在自交作物中，由于 LD 衰减较慢，这一问题更加突出。全转录组关联">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://laowang2023.cn/2025/11/14/20251114-emmaxtwas/index.png">
<meta property="article:published_time" content="2025-11-14T08:28:11.000Z">
<meta property="article:modified_time" content="2025-11-18T02:04:50.342Z">
<meta property="article:author" content="老王">
<meta property="article:tag" content="TWAS">
<meta property="article:tag" content="Transcriptome-wide Association Study">
<meta property="article:tag" content="全转录组关联分析">
<meta property="article:tag" content="EMMAX">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="https://laowang2023.cn/2025/11/14/20251114-emmaxtwas/index.png">
  
  
  
  <title>什么？EMMAX也能做全转录组关联分析（Transcriptome-wide Association Study，TWAS） - 请叫我老王</title>

  <link  rel="stylesheet" href="https://lib.baomitu.com/twitter-bootstrap/4.6.1/css/bootstrap.min.css" />



  <link  rel="stylesheet" href="https://lib.baomitu.com/github-markdown-css/4.0.0/github-markdown.min.css" />

  <link  rel="stylesheet" href="https://lib.baomitu.com/hint.css/2.7.0/hint.min.css" />

  <link  rel="stylesheet" href="https://lib.baomitu.com/fancybox/3.5.7/jquery.fancybox.min.css" />



<!-- 主题依赖的图标库，不要自行修改 -->
<!-- Do not modify the link that theme dependent icons -->

<link rel="stylesheet" href="//at.alicdn.com/t/font_1749284_hj8rtnfg7um.css">



<link rel="stylesheet" href="//at.alicdn.com/t/font_1736178_lbnruvf0jn.css">


<link  rel="stylesheet" href="/css/main.css" />


  <link id="highlight-css" rel="stylesheet" href="/css/highlight.css" />
  
    <link id="highlight-css-dark" rel="stylesheet" href="/css/highlight-dark.css" />
  




  <script id="fluid-configs">
    var Fluid = window.Fluid || {};
    Fluid.ctx = Object.assign({}, Fluid.ctx)
    var CONFIG = {"hostname":"laowang2023.cn","root":"/","version":"1.9.4","typing":{"enable":true,"typeSpeed":70,"cursorChar":"_","loop":false,"scope":[]},"anchorjs":{"enable":true,"element":"h1,h2,h3,h4,h5,h6","placement":"left","visible":"hover","icon":""},"progressbar":{"enable":true,"height_px":3,"color":"#29d","options":{"showSpinner":false,"trickleSpeed":100}},"code_language":{"enable":true,"default":"TEXT"},"copy_btn":true,"image_caption":{"enable":true},"image_zoom":{"enable":true,"img_url_replace":["",""]},"toc":{"enable":true,"placement":"right","headingSelector":"h1,h2,h3,h4,h5,h6","collapseDepth":0},"lazyload":{"enable":true,"loading_img":"/img/loading.gif","onlypost":false,"offset_factor":2},"web_analytics":{"enable":true,"follow_dnt":true,"baidu":null,"google":null,"gtag":null,"tencent":{"sid":null,"cid":null},"woyaola":null,"cnzz":null,"leancloud":{"app_id":"2gDQrSMhKFxALJaFFpTbgc23-gzGzoHsz","app_key":"NBsdUEdxwrnzaL1XcLReQM4N","server_url":"https://2gdqrsmh.lc-cn-n1-shared.com","path":"window.location.pathname","ignore_local":true}},"search_path":"/local-search.xml"};

    if (CONFIG.web_analytics.follow_dnt) {
      var dntVal = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
      Fluid.ctx.dnt = dntVal && (dntVal.startsWith('1') || dntVal.startsWith('yes') || dntVal.startsWith('on'));
    }
  </script>
  <script  src="/js/utils.js" ></script>
  <script  src="/js/color-schema.js" ></script>
  

  

  

  

  

  

  

  
    
  



  
<meta name="generator" content="Hexo 5.4.2"><link rel="alternate" href="/atom.xml" title="请叫我老王" type="application/atom+xml">
</head>


<body>
  

  <header>
    

<div class="header-inner" style="height: 70vh;">
  <nav id="navbar" class="navbar fixed-top  navbar-expand-lg navbar-dark scrolling-navbar">
  <div class="container">
    <a class="navbar-brand" href="/">
      <strong>请叫我老王</strong>
    </a>

    <button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <div class="animated-icon"><span></span><span></span><span></span></div>
    </button>

    <!-- Collapsible content -->
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto text-center">
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/">
                <i class="iconfont icon-home-fill"></i>
                <span>首页</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/archives/">
                <i class="iconfont icon-archive-fill"></i>
                <span>归档</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/categories/">
                <i class="iconfont icon-category-fill"></i>
                <span>分类</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/tags/">
                <i class="iconfont icon-tags-fill"></i>
                <span>标签</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/about/">
                <i class="iconfont icon-user-fill"></i>
                <span>关于</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/atom.xml">
                <i class="iconfont icon-rss-fill"></i>
                <span>订阅</span>
              </a>
            </li>
          
        
        
          <li class="nav-item" id="search-btn">
            <a class="nav-link" target="_self" href="javascript:;" data-toggle="modal" data-target="#modalSearch" aria-label="Search">
              <i class="iconfont icon-search"></i>
            </a>
          </li>
          
        
        
          <li class="nav-item" id="color-toggle-btn">
            <a class="nav-link" target="_self" href="javascript:;" aria-label="Color Toggle">
              <i class="iconfont icon-dark" id="color-toggle-icon"></i>
            </a>
          </li>
        
      </ul>
    </div>
  </div>
</nav>

  

<div id="banner" class="banner" parallax=true
     style="background: url('/2025/11/14/20251114-emmaxtwas/banner.jpg') no-repeat center center; background-size: cover;">
  <div class="full-bg-img">
    <div class="mask flex-center" style="background-color: rgba(0, 0, 0, 0.3)">
      <div class="banner-text text-center fade-in-up">
        <div class="h2">
          
            <span id="subtitle" data-typed-text="什么？EMMAX也能做全转录组关联分析（Transcriptome-wide Association Study，TWAS）"></span>
          
        </div>

        
          
  <div class="mt-3">
    
    
      <span class="post-meta">
        <i class="iconfont icon-date-fill" aria-hidden="true"></i>
        <time datetime="2025-11-14 16:28" pubdate>
          2025年11月14日 下午
        </time>
      </span>
    
  </div>

  <div class="mt-1">
    
      <span class="post-meta mr-2">
        <i class="iconfont icon-chart"></i>
        
          2.8k 字
        
      </span>
    

    
      <span class="post-meta mr-2">
        <i class="iconfont icon-clock-fill"></i>
        
        
        
          24 分钟
        
      </span>
    

    
    
      
        <span id="leancloud-page-views-container" class="post-meta" style="display: none">
          <i class="iconfont icon-eye" aria-hidden="true"></i>
          <span id="leancloud-page-views"></span> 次
        </span>
        
      
    
  </div>


        
      </div>

      
    </div>
  </div>
</div>

</div>

  </header>

  <main>
    
      

<div class="container-fluid nopadding-x">
  <div class="row nomargin-x">
    <div class="side-col d-none d-lg-block col-lg-2">
      

    </div>

    <div class="col-lg-8 nopadding-x-md">
      <div class="container nopadding-x-md" id="board-ctn">
        <div id="board">
          <article class="post-content mx-auto">
            <!-- SEO header -->
            <h1 style="display: none">什么？EMMAX也能做全转录组关联分析（Transcriptome-wide Association Study，TWAS）</h1>
            
            
              <div class="markdown-body">
                
                <p>全基因组关联分析从正向遗传学的角度出发，探究“基因型-表型”之间的关联，近年来在人类疾病和作物产量、品质以及抗逆等多方面的遗传机理研究中发挥重要作用。然而由于连锁不平衡（Linkage Disequilibrium，LD）的存在，我们很难直接从 GWAS 结果中找到和表型相关的因果变异（causal variant）或候选基因。尤其在自交作物中，由于 LD 衰减较慢，这一问题更加突出。全转录组关联分析（Transcriptome-wide Association Study，TWAS）通过分析基因表达量的变异与性状表型之间的关联，从而在某种程度上直接捕捉调控层面的遗传效应，因此更容易定位潜在功能基因。正因为其在定位候选基因方面具有这样的优势，众多 TWAS 分析方法得以提出并应用于大量遗传学研究，例如 PrediXcan、FUSION 等方法对于关注 TWAS 的老师和同学来说并不陌生<sup id="fnref:1" class="footnote-ref"><a href="#fn:1" rel="footnote"><span class="hint--top hint--rounded" aria-label="[Wainberg, M., Sinnott-Armstrong, N., Mancuso, N., Barbeira, A. N., Knowles, D. A., Golan, D., Ermel, R., Ruusalepp, A., Quertermous, T., Hao, K., Björkegren, J. L. M., Im, H. K., Pasaniuc, B., Rivas, M. A., & Kundaje, A. (2019). Opportunities and challenges for transcriptome-wide association studies. Nature genetics, 51(4), 592–599. https://doi.org/10.1038/s41588-019-0385-z](https://doi.org/10.1038/s41588-019-0385-z)">[1]</span></a></sup>。</p>
<p>随着测序成本的不断下降，TWAS 在植物遗传学领域的研究案列也在不断增加，例如在一篇关于甘蓝型油菜种子中硫苷含量的研究中，作者结合 GWAS 和 TWAS 探究了控制种子硫苷含量的位点，并对其中一个候选基因 <em>BnaC02.GTR2</em> 进行验证<sup id="fnref:2" class="footnote-ref"><a href="#fn:2" rel="footnote"><span class="hint--top hint--rounded" aria-label="[Tan, Z., Xie, Z., Dai, L., Zhang, Y., Zhao, H., Tang, S., Wan, L., Yao, X., Guo, L., & Hong, D. (2022). Genome- and transcriptome-wide association studies reveal the genetic basis and the breeding history of seed glucosinolate content in Brassica napus. Plant biotechnology journal, 20(1), 211–225. https://doi.org/10.1111/pbi.13707](https://doi.org/10.1111/pbi.13707)">[2]</span></a></sup>。然而在实验方法部分我们看到，该该研究使用的是经典 GWAS 软件 EMMAX 来进行 TWAS 分析。EMMAX 使用混合线性模型（Mixed Linear Model，MLM），作为 GWAS 分析的常用软件为人所熟知<sup id="fnref:3" class="footnote-ref"><a href="#fn:3" rel="footnote"><span class="hint--top hint--rounded" aria-label="[Kang, H. M., Sul, J. H., Service, S. K., Zaitlen, N. A., Kong, S. Y., Freimer, N. B., Sabatti, C., & Eskin, E. (2010). Variance component model to account for sample structure in genome-wide association studies. Nature genetics, 42(4), 348–354. https://doi.org/10.1038/ng.548](https://doi.org/10.1038/ng.548)">[3]</span></a></sup>，也是老王在最开始进行关联分析学习时接触的第一个 GWAS 分析软件。但 EMMAX 并非主流 TWAS 工具，那么 EMMAX 是如何用于 TWAS 研究呢？</p>
<h2 id="输入文件">输入文件</h2>
<p>EMMAX 使用 tped/tfam 格式作为基因型输入文件，我们自然而然地会想是否是把表达量矩阵整理成类似 tped 格式呢？这个思路是对的，然而在实际运行的时候我们会发现 EMMAX 会报错退出。原因也很显然，基因型是离散变量，而表达量是连续性变量。</p>
<figure class="highlight text"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs text">ERROR: Only 0,1,2 are expected for genotypes, but 0.023430337193113514 is observed<br></code></pre></td></tr></table></figure>
<p>那么该如何解决这一问题呢？当我们仔细阅读 EMMAX 软件的<a target="_blank" rel="noopener" href="https://genome.sph.umich.edu/wiki/EMMAX#Running_EMMAX_with_dosages"><strong>在线文档</strong></a>时，可以看到有小段提到可以使用 dosage 值作为输入，但数值范围需要在 0~2 之间，并且提到了一个在软件帮助文档中没有提到的参数 <code>-Z</code>。</p>
<blockquote>
<p><strong>Running EMMAX with dosages</strong><br>
If you add -Z option, it will accept .tped file format, where each individual is represented as one dosage value (ranging from 0 to 2), instead of two genotype columns, (which is one of the standard PLINK dosage format). You will be able to run EMMAX with this model. But when creating the kinship matrix, you will not be able to use dosage-based genotypes.</p>
</blockquote>
<p>在 TWAS 场景下，我们将每个基因在不同样本中的表达量缩放至 0~2 范围，使其形式上可被视为“连续型 dosage”，从而被 EMMAX 接受，尽管此时无法基于 dosage 构建亲缘矩阵（kinship）。按照这一思路，我们对表达量矩阵进行转换并整理成 tped/tfam 格式，加上 <code>-Z</code> 参数重新运行 EMMAX 可以得到输出结果。可以看到该结果与文章中结果整体一致。</p>
<p><img src="./GLblup.TWAS.png" srcset="/img/loading.gif" lazyload alt="使用 EMMAX 得到的 TWAS 结果" title="使用 EMMAX 得到的 TWAS 结果"><br>
<img src="./banner.jpg" srcset="/img/loading.gif" lazyload alt="原文中的 TWAS 结果" title="原文中的 TWAS 结果"></p>
<h2 id="进一步讨论：TWAS-信号峰是否意味着-causal-基因？">进一步讨论：TWAS 信号峰是否意味着 causal 基因？</h2>
<p>开头我们提到 GWAS 由于 LD 的存在导致的定位精度问题，TWAS 通过引入表达调控层面的信息，可以帮助缩小候选基因范围、提高候选基因预测的可信度。然而在本文中 TWAS 例子中我们看到在 A08、A09、C02 以及 C09 染色体上都存在类似 GWAS 结果的簇状峰，那么是否说明这些区域超出显著性阈值的基因都是引起表型变异的 causal 基因吗？我想这显然是不太可能的。种子中的硫苷会降低油菜饼粕的饲用价值，现代油菜”双低（低芥酸，低硫苷）“育种使不断选择“低硫苷”性状，油菜基因组中与硫苷含量相关 QTLs 位点受到强烈选择，这些受选择区域形成较大的 LD block。处于同一 haplotype 的多个基因往往具有一致（或相反）的表达趋势，因此在 TWAS 中可能同时被检测为显著基因。这些基因并非都具有直接功能，而是在 LD 结构影响下共同表现出关联信号。换句话说：在具有强选择或大 LD block 的区域，TWAS 与 GWAS 都可能出现区域性信号，而非单一的候选基因。</p>
<p>因此，无论是 GWAS 还是 TWAS，结果的可靠解释仍需结合 LD 结构、群体历史、基因功能注释、变异影响预测以及进一步的实验验证等多方面信息综合判断。</p>
<hr>
<p><img src="https://images.pexels.com/photos/20555568/pexels-photo-20555568.jpeg?auto=compress&amp;cs=tinysrgb&amp;w=600&amp;lazy=load" srcset="/img/loading.gif" lazyload alt="图片与主题无关" title="图片与主题无关"></p>
<p class="note note-primary">参考文献</p>
<section class="footnotes"><div class="footnote-list"><ol><li><span id="fn:1" class="footnote-text"><span><a target="_blank" rel="noopener" href="https://doi.org/10.1038/s41588-019-0385-z">Wainberg, M., Sinnott-Armstrong, N., Mancuso, N., Barbeira, A. N., Knowles, D. A., Golan, D., Ermel, R., Ruusalepp, A., Quertermous, T., Hao, K., Björkegren, J. L. M., Im, H. K., Pasaniuc, B., Rivas, M. A., &amp; Kundaje, A. (2019). Opportunities and challenges for transcriptome-wide association studies. Nature genetics, 51(4), 592–599. https://doi.org/10.1038/s41588-019-0385-z</a>
<a href="#fnref:1" rev="footnote" class="footnote-backref"> ↩</a></span></span></li><li><span id="fn:2" class="footnote-text"><span><a target="_blank" rel="noopener" href="https://doi.org/10.1111/pbi.13707">Tan, Z., Xie, Z., Dai, L., Zhang, Y., Zhao, H., Tang, S., Wan, L., Yao, X., Guo, L., &amp; Hong, D. (2022). Genome- and transcriptome-wide association studies reveal the genetic basis and the breeding history of seed glucosinolate content in Brassica napus. Plant biotechnology journal, 20(1), 211–225. https://doi.org/10.1111/pbi.13707</a>
<a href="#fnref:2" rev="footnote" class="footnote-backref"> ↩</a></span></span></li><li><span id="fn:3" class="footnote-text"><span><a target="_blank" rel="noopener" href="https://doi.org/10.1038/ng.548">Kang, H. M., Sul, J. H., Service, S. K., Zaitlen, N. A., Kong, S. Y., Freimer, N. B., Sabatti, C., &amp; Eskin, E. (2010). Variance component model to account for sample structure in genome-wide association studies. Nature genetics, 42(4), 348–354. https://doi.org/10.1038/ng.548</a>
<a href="#fnref:3" rev="footnote" class="footnote-backref"> ↩</a></span></span></li></ol></div></section>
                
              </div>
            
            <hr/>
            <div>
              <div class="post-metas my-3">
  
    <div class="post-meta mr-3 d-flex align-items-center">
      <i class="iconfont icon-category"></i>
      

<span class="category-chains">
  
  
    
      <span class="category-chain">
        
  <a href="/categories/%E6%8A%80%E6%9C%AF%E5%88%86%E4%BA%AB/" class="category-chain-item">技术分享</a>
  
  

      </span>
    
  
</span>

    </div>
  
  
    <div class="post-meta">
      <i class="iconfont icon-tags"></i>
      
        <a href="/tags/TWAS/">#TWAS</a>
      
        <a href="/tags/Transcriptome-wide-Association-Study/">#Transcriptome-wide Association Study</a>
      
        <a href="/tags/%E5%85%A8%E8%BD%AC%E5%BD%95%E7%BB%84%E5%85%B3%E8%81%94%E5%88%86%E6%9E%90/">#全转录组关联分析</a>
      
        <a href="/tags/EMMAX/">#EMMAX</a>
      
    </div>
  
</div>


              
  

  <div class="license-box my-3">
    <div class="license-title">
      <div>什么？EMMAX也能做全转录组关联分析（Transcriptome-wide Association Study，TWAS）</div>
      <div>https://laowang2023.cn/2025/11/14/20251114-emmaxtwas/</div>
    </div>
    <div class="license-meta">
      
        <div class="license-meta-item">
          <div>作者</div>
          <div>老王</div>
        </div>
      
      
        <div class="license-meta-item license-meta-date">
          <div>发布于</div>
          <div>2025年11月14日</div>
        </div>
      
      
      
        <div class="license-meta-item">
          <div>许可协议</div>
          <div>
            
              
              
                <a target="_blank" href="https://creativecommons.org/licenses/by/4.0/">
                  <span class="hint--top hint--rounded" aria-label="BY - 署名">
                    <i class="iconfont icon-by"></i>
                  </span>
                </a>
              
            
          </div>
        </div>
      
    </div>
    <div class="license-icon iconfont"></div>
  </div>



              
                <div class="post-prevnext my-3">
                  <article class="post-prev col-6">
                    
                    
                  </article>
                  <article class="post-next col-6">
                    
                    
                      <a href="/2025/05/29/20250529-BackgroundAnalysis/" title="R语言 | 一个计算背景回复率的工具">
                        <span class="hidden-mobile">R语言 | 一个计算背景回复率的工具</span>
                        <span class="visible-mobile">下一篇</span>
                        <i class="iconfont icon-arrowright"></i>
                      </a>
                    
                  </article>
                </div>
              
            </div>

            
  
  
    <article id="comments" lazyload>
      
  <div id="valine"></div>
  <script type="text/javascript">
    Fluid.utils.loadComments('#valine', function() {
      Fluid.utils.createScript('https://lib.baomitu.com/valine/1.5.1/Valine.min.js', function() {
        var options = Object.assign(
          {"appId":"81Ynz10f9eqlTLw0V6ue4tBu-gzGzoHsz","appKey":"4Mxe0RlrV6wJ0n9C6ZDpYI6O","path":"window.location.pathname","placeholder":"你是不是想说点什么","avatar":"identicon","meta":["nick","mail","link"],"requiredFields":[],"pageSize":10,"lang":"zh-CN","highlight":false,"recordIP":true,"serverURLs":"https://81ynz10f.lc-cn-n1-shared.com","emojiCDN":null,"emojiMaps":null,"enableQQ":true},
          {
            el: "#valine",
            path: window.location.pathname
          }
        )
        new Valine(options);
        Fluid.utils.waitElementVisible('#valine .vcontent', () => {
          var imgSelector = '#valine .vcontent img:not(.vemoji)';
          Fluid.plugins.imageCaption(imgSelector);
          Fluid.plugins.fancyBox(imgSelector);
        })
      });
    });
  </script>
  <noscript>Please enable JavaScript to view the comments</noscript>


    </article>
  


          </article>
        </div>
      </div>
    </div>

    <div class="side-col d-none d-lg-block col-lg-2">
      
  <aside class="sidebar" style="margin-left: -1rem">
    <div id="toc">
  <p class="toc-header">
    <i class="iconfont icon-list"></i>
    <span>目录</span>
  </p>
  <div class="toc-body" id="toc-body"></div>
</div>



  </aside>


    </div>
  </div>
</div>





  



  



  



  



  







    

    
      <a id="scroll-top-button" aria-label="TOP" href="#" role="button">
        <i class="iconfont icon-arrowup" aria-hidden="true"></i>
      </a>
    

    
      <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="ModalLabel"
     aria-hidden="true">
  <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">搜索</h4>
        <button type="button" id="local-search-close" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body mx-3">
        <div class="md-form mb-5">
          <input type="text" id="local-search-input" class="form-control validate">
          <label data-error="x" data-success="v" for="local-search-input">关键词</label>
        </div>
        <div class="list-group" id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>

    

    
  </main>

  <footer>
    <div class="footer-inner">
  
    <div class="footer-content">
       <a href="https://hexo.io" target="_blank" rel="nofollow noopener"><span>Hexo</span></a> <i class="iconfont icon-love"></i> <a href="https://github.com/fluid-dev/hexo-theme-fluid" target="_blank" rel="nofollow noopener"><span>Fluid</span></a> 
    </div>
  
  
    <div class="statistics">
  
  

  
    
      <span id="leancloud-site-pv-container" style="display: none">
        总访问量 
        <span id="leancloud-site-pv"></span>
         次
      </span>
    
    
      <span id="leancloud-site-uv-container" style="display: none">
        总访客数 
        <span id="leancloud-site-uv"></span>
         人
      </span>
    
    

  
</div>

  
  
  
</div>

  </footer>

  <!-- Scripts -->
  
  <script  src="https://lib.baomitu.com/nprogress/0.2.0/nprogress.min.js" ></script>
  <link  rel="stylesheet" href="https://lib.baomitu.com/nprogress/0.2.0/nprogress.min.css" />

  <script>
    NProgress.configure({"showSpinner":false,"trickleSpeed":100})
    NProgress.start()
    window.addEventListener('load', function() {
      NProgress.done();
    })
  </script>


<script  src="https://lib.baomitu.com/jquery/3.6.0/jquery.min.js" ></script>
<script  src="https://lib.baomitu.com/twitter-bootstrap/4.6.1/js/bootstrap.min.js" ></script>
<script  src="/js/events.js" ></script>
<script  src="/js/plugins.js" ></script>


  <script  src="https://lib.baomitu.com/typed.js/2.0.12/typed.min.js" ></script>
  <script>
    (function (window, document) {
      var typing = Fluid.plugins.typing;
      var subtitle = document.getElementById('subtitle');
      if (!subtitle || !typing) {
        return;
      }
      var text = subtitle.getAttribute('data-typed-text');
      
        typing(text);
      
    })(window, document);
  </script>




  
    <script  src="/js/img-lazyload.js" ></script>
  




  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/tocbot/4.18.2/tocbot.min.js', function() {
    var toc = jQuery('#toc');
    if (toc.length === 0 || !window.tocbot) { return; }
    var boardCtn = jQuery('#board-ctn');
    var boardTop = boardCtn.offset().top;

    window.tocbot.init(Object.assign({
      tocSelector     : '#toc-body',
      contentSelector : '.markdown-body',
      linkClass       : 'tocbot-link',
      activeLinkClass : 'tocbot-active-link',
      listClass       : 'tocbot-list',
      isCollapsedClass: 'tocbot-is-collapsed',
      collapsibleClass: 'tocbot-is-collapsible',
      scrollSmooth    : true,
      includeTitleTags: true,
      headingsOffset  : -boardTop,
    }, CONFIG.toc));
    if (toc.find('.toc-list-item').length > 0) {
      toc.css('visibility', 'visible');
    }

    Fluid.events.registerRefreshCallback(function() {
      if ('tocbot' in window) {
        tocbot.refresh();
        var toc = jQuery('#toc');
        if (toc.length === 0 || !tocbot) {
          return;
        }
        if (toc.find('.toc-list-item').length > 0) {
          toc.css('visibility', 'visible');
        }
      }
    });
  });
</script>


  <script src=https://lib.baomitu.com/clipboard.js/2.0.11/clipboard.min.js></script>

  <script>Fluid.plugins.codeWidget();</script>


  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/anchor-js/4.3.1/anchor.min.js', function() {
    window.anchors.options = {
      placement: CONFIG.anchorjs.placement,
      visible  : CONFIG.anchorjs.visible
    };
    if (CONFIG.anchorjs.icon) {
      window.anchors.options.icon = CONFIG.anchorjs.icon;
    }
    var el = (CONFIG.anchorjs.element || 'h1,h2,h3,h4,h5,h6').split(',');
    var res = [];
    for (var item of el) {
      res.push('.markdown-body > ' + item.trim());
    }
    if (CONFIG.anchorjs.placement === 'left') {
      window.anchors.options.class = 'anchorjs-link-left';
    }
    window.anchors.add(res.join(', '));

    Fluid.events.registerRefreshCallback(function() {
      if ('anchors' in window) {
        anchors.removeAll();
        var el = (CONFIG.anchorjs.element || 'h1,h2,h3,h4,h5,h6').split(',');
        var res = [];
        for (var item of el) {
          res.push('.markdown-body > ' + item.trim());
        }
        if (CONFIG.anchorjs.placement === 'left') {
          anchors.options.class = 'anchorjs-link-left';
        }
        anchors.add(res.join(', '));
      }
    });
  });
</script>


  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/fancybox/3.5.7/jquery.fancybox.min.js', function() {
    Fluid.plugins.fancyBox();
  });
</script>


  <script>Fluid.plugins.imageCaption();</script>

  <script defer src="/js/leancloud.js" ></script>

  <script  src="/js/local-search.js" ></script>





<!-- 主题的启动项，将它保持在最底部 -->
<!-- the boot of the theme, keep it at the bottom -->
<script  src="/js/boot.js" ></script>


  

  <noscript>
    <div class="noscript-warning">博客在允许 JavaScript 运行的环境下浏览效果更佳</div>
  </noscript>
</body>
</html>
